class Joueur
	constructor: (game,perso) ->
		if perso not instanceof Perso
			throw new _NotExpectedType_Exception "Mauvais type de paramètre", "joueur.class.coffee", 2
		if game not instanceof Game
			throw new _NotExpectedType_Exception "Mauvais type de paramètre", "joueur.class.coffee", 2
		return this
		@perso = perso
		@game = game
	die: (kind = 'basic') =>
		@perso.setHp(0).animateDeath(kind)
		@game.over
		this
	move: (direction,speed = 1) =>
		@perso.turn(direction).accel(speed)
		this
	takeHit: (hit) =>
		return false unless hit instanceof Hit
		@perso.hit hit
		this
